﻿using System;
using System.Windows;

namespace Gmantis.Controls
{
    public class DragDropEventArgs : EventArgs
    {
        // Fields
        private RoutedEventArgs _mouseArgs;

        // Methods
        public DragDropEventArgs(RoutedEventArgs e, UIElement source, UIElement target, DragDropEffect effect, System.Windows.Controls.ScrollViewer scrollViewer)
        {
            this.DragSource = source;
            this.DropTarget = target;
            this.Effect = effect;
            this.ScrollViewer = scrollViewer;
            this._mouseArgs = e;
        }

        public Point GetPosition(UIElement relativeTo)
        {
            return InputEventArgs.GetPosition(this._mouseArgs, relativeTo);
        }

        // Properties
        public UIElement DragSource { get; internal set; }

        public UIElement DropTarget { get; internal set; }

        public DragDropEffect Effect { get; set; }

        public System.Windows.Controls.ScrollViewer ScrollViewer { get; set; }
    }
}
